import {Link, useParams, useSearchParams} from "react-router-dom";

const Login=()=>{
    // const [params] = useSearchParams();
    // const id=params.get('id');
    // const name=params.get('name')
    const params=useParams();
    const id=params.id
    const name=params.name;

    return(
        <div>
            我是登录页
            <br/>
            {/*声明式导航*/}
            <Link to={'/article'}>跳转到文章页</Link>
            <br/>
            {id}
            <br/>
            {name}
        </div>
    )
}

export default Login